import { native, sys } from "cc";
import GameUI from "../UI/GameUI";
import MainUI from "../UI/MainUI";

export default class AndroidTool {

    static ShowAD(ADEnum: ADEnum) {
        // if (sys.os == sys.OS.ANDROID) {
        //     native.reflection.callStaticMethod("com/cocos/game/AppActivity", ADEnum, "()V");
        //     if(ADEnum == "GameVideo1"){
        //         playVideoSuccess1 = function () {
        //             // MainUI.Instance.onUnlockReward();
        //         }
        //     }
        //     else if(ADEnum == "GameVideo2"){
        //         playVideoSuccess2 = function () {
        //             // GameUI.Instance.AnswerReward();
        //         }
        //     }
        //     else if(ADEnum == "GameVideo3"){
        //         playVideoSuccess3 = function () {
        //             // GameUI.Instance.NextReward();
        //         }
        //     }
        //     else console.error(ADEnum  + "," + "参数错误");
        // }
    }
}

export enum ADEnum {
    None = 'None',
    ChaPing = 'ChaPing',
    Exit = 'Exit',
    KeFu = 'KeFu',
    YinSi = 'Hide',
    MoreGame = 'MoreGame',
    GameVideo1 = "GameVideo1",
    GameVideo2 = "GameVideo2",
    GameVideo3 = "GameVideo3"
}